﻿// Decompiled with JetBrains decompiler
// Type: Netick.InputBlock
// Assembly: Netick, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 6726ECA1-C773-4CF7-8952-E81B30D93B52
// Assembly location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.dll
// XML documentation location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.xml

using System.Runtime.CompilerServices;

#nullable disable
namespace Netick;

internal struct InputBlock(int type, int playerIndex, int* ptr, int size)
{
  public readonly unsafe int* Ptr = ptr;
  public readonly int Type = type;
  public readonly int PlayerIndex = playerIndex;
  public readonly int SizeBytes = size;

  [MethodImpl(MethodImplOptions.AggressiveInlining)]
  public unsafe void CopyTo(int* dest)
  {
    MemoryAllocation.Copy((void*) dest, (void*) this.Ptr, (long) this.SizeBytes);
  }

  [MethodImpl(MethodImplOptions.AggressiveInlining)]
  public unsafe void Reset() => MemoryAllocation.Clear((void*) this.Ptr, (long) this.SizeBytes);
}
